home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 4 / ETO Development Tools 4.iso / Essentials / MacApp Documentation / MacApp.TECH$ Archives / 1991 / Feb 91 / MacApp.Tech$ 2⁄22⁄91 / 3026-Serial handlers-Feb91 < prev    next >
Encoding:
Text File  |  1991-03-06  |  2.3 KB  |  55 lines  |  [TEXT/GEOL]

  1. Item    8327353                         20-Feb-91        06:51
  2.  
  3. From:   MIKE.BLACKWELL@ROVER.RI.CMU.EDU@INTERNET# 
  4.  
  5. To:     MACAPP.TECH$                    MacApp Technical
  6.  
  7. INTERNET# Document Id: <667079498/mkb@ROVER.RI.CMU.EDU>
  8.  
  9. ------------------------------------------------------------------------------
  10.  
  11. Sub:    Serial handlers
  12.  
  13. If you use AppleLink 6.0, you win! The Reply button works for gatewayed E-mail.
  14. Otherwise, copy & paste this: Mike.Blackwell@ROVER.RI.CMU.EDU@INTERNET#
  15.  
  16. From: Mike.Blackwell@ROVER.RI.CMU.EDU
  17. To: macapp.tech$@applelink.apple.com
  18.  
  19. A few weeks ago I asked if anyone had any objects that would help
  20. interface a MacApp application with the serial ports. While noone did
  21. (or would admit to it), several people asked me to pass on any info I
  22. received... I've gone ahead and wrote some code that solves my
  23. particular problem (a graphical controller for our mobile robot), and
  24. I'd like to pass it along to the community.
  25.  
  26. I have the relevant objects packaged in to simple dumb terminal
  27. emulator to illustrate how they work. The three objects of concern are:
  28. TSerialHandler, which manages interactions to and from the serial
  29. drivers; TConsoleView, a subclass of TTranscriptView which implements a
  30. simple console window (and fixes a couple of annoying bugs in
  31. TTranscriptView - well, it does say to use at your own risk...); and
  32. TDisplayHandler, an idle time cohandler which polls the serial handler
  33. and ships incoming characters to the console view. Key downs from the
  34. console view are sent directly to the serial handler.
  35.  
  36. Because the serial driver is polled, there is a possiblity of loosing
  37. some characters, depending on what other processing your application
  38. does and how big an input buffer you allocate. In my case, I can talk
  39. reliably at 9600 baud as long as the packet burst length is less than a
  40. few hundred bytes.
  41.  
  42. This is all in C++, and uses Robert Lenoil's CPlusMacApp package.
  43.  
  44. Since I am not directly on AppleLink, I'm not sure of the best method
  45. for sending this stuff out. I can Stuffit/Binhex it and email it
  46. directly to people, or maybe just to one person who can archive it. Let
  47. me know what would be best.
  48.  
  49.                 Mike Blackwell          mkb@rover.ri.cmu.edu
  50.                 Robotics Institute
  51.                 Carnegie Mellon University
  52.                 Pittsburgh, PA, 15213
  53.  
  54.                 412-268-8830
  55.